package com.yunpi.integration.serviceb.demob.controller;

import com.yunpi.integration.common.dto.Customer;
import com.yunpi.integration.common.utils.Ret;
import org.springframework.web.bind.annotation.*;

/**
 * @author 汪春
 * @title: ServiceAController
 * @projectName yunpi_integration_demo
 * @description: TODO
 * @date 2020/6/4 15:48
 */
@RestController
@RequestMapping("/serviceA")
public class ServiceAController {

    @GetMapping("/customs/{id}")
    public Ret get(@PathVariable Integer id) {
        Customer customer = new Customer();
        customer.setId(id);
        customer.setAge(25);
        customer.setName("tom " + id);
        customer.setGender(1);
        System.out.println("service a = " + id);
        return Ret.data(customer);
    }

}
